package com.youth.youthservice.entity.announcement;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;

import java.util.ArrayList;
import java.util.Date;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author huangqicai
 * @since 2023-03-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Announcement对象", description="")
public class Announcement implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公告id")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "公告标题")
    private String title;

    @ApiModelProperty(value = "公告内容")
    private String contentText;

    @ApiModelProperty(value = "公告附属图片")
    private String image;

    @ApiModelProperty(value = "公告是否撤销(1撤销了，0没有撤销)")
    private Integer cancel;

    @ApiModelProperty(value = "逻辑删除 1 删除，0 没有删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "公告优先级(1表示一级公告、2表示二级公告，3表示三级公告)")
    private Integer priority;

    @ApiModelProperty(value = "用户类型：1老师 2学生")
    private Integer userType;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill=FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    @ApiModelProperty(value = "公告发布时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    /*-----*/

    @TableField(exist = false)
    private String viewCount;

    @TableField(exist = false)
    private Integer readFlag;

}
